package com.tianyu.inspection.service.api;

import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.tianyu.inspection.entity.BasicInformation;
import com.tianyu.inspection.entity.vo.ServiceRo;

import java.util.List;

/**********************************
 * @Author YSW
 * @Description
 * @Date 2023/9/12 - 15:53
 **********************************/

public interface IBasicInformationService extends IBaseService<BasicInformation> {
    IPage<BasicInformation> searchListTypePage(JSONObject queryMo);

    boolean insert(BasicInformation basicInformation);

    ServiceRo batchInsert(List<BasicInformation> dataList);

    BasicInformation selectById(Integer basicInformationId);

    boolean updateById(BasicInformation basicInformation);

    IPage<BasicInformation> searchListPage(JSONObject queryMo);

    ServiceRo getAllData(JSONObject jsonObject);

    ServiceRo getBasicInformationTypeTree(JSONObject jsonObject);

    ServiceRo getBasicInformationTree(JSONObject jsonObject);

    ServiceRo getBasicInformationTreeLevel(JSONObject jsonObject);

    ServiceRo loadXmlJson(JSONObject kmlObject, Integer folderId, Integer typeDefId, Boolean loadFolder, Integer loadType, Integer projectId, Integer userId);

    JSONObject kmlJsonLoadPrepare(JSONObject kmlObject, Integer loadType);

    /**
     * 通过批量ID删除数据
     * @param ids ID集
     * @param projectId projectId
     * @return 是否操作成功
     */
    ServiceRo batchDelete(List<Integer> ids, Integer projectId);

    /**
     * 通过ID删除一条数据
     * @param id id
     * @param projectId projectId
     * @return 是否操作成功
     */
    ServiceRo deleteById(Integer id, Integer projectId);
}
